#ifndef __ADU_INTRO_SCENE_H__
#define __ADU_INTRO_SCENE_H__

#include "cocos2d.h"
#include "ADUConfig.h"
#include "ADUConstant.h"
#include "ADUGamePlayScene.h"
USING_NS_CC;

class IntroLayer : public cocos2d::Layer
{
public:
	IntroLayer();
	~IntroLayer();
    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::Scene* createScene();

    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  
        
    // implement the "static create()" method manually
    CREATE_FUNC(IntroLayer);
    void update(float dt);
    void doDuckMotherWalk();
    void doDuckChildWalk();
    void doUglyDuckWalk();
    void doUglyDuckFall();
    void duckMove(float dt);
    void duckFall(float dt);
    void stopAction();
private:
    bool mChangeAnimation;
    float mSpeed;
    float mFallSpeed;
    float mThresholdX;
    float mThresholdY;
	Sprite* mDuckMother;
    Sprite* mDuckKid[4];
    Sprite* mUglyDuck;
    Sprite* mBackground;
    bool mFirst;
    float mTimer;
    Size mSizeDuckMother, mSizeDuckKid;
    int currentBG;
};


#endif
